package day3.HomeWork;

public class Test1 {
    public static void main(String[] args) {
        //1.有数组 String[] arr = new String[]{"hello","world","!"}; 请使用2种不同的方式进行遍历
        String[] arr = new String[]{"hello","world","!"};
        //方法一：
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }
        System.out.println("===============");
        //方法二：增强for循环
        for (String str : arr) {
            System.out.println(str);
        }
    }

}
